package com.example.pojo;

import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

@Data
public class BusNews implements Serializable {
    @Serial
    private static final long serialVersionUID = 10086L;
    private Integer id;
    private String title;
    private String img;
    private String content;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;
    private Integer isDeleted;
    public String someMsg(){
        String msg="BusNews[";
        if(this.id!=null)
            msg+="id :"+this.id+" ";
        if(this.title!=null)
            msg+="title: "+this.title+" ";
        if(this.img!=null)
            msg+="img: "+this.img+" \n";
        if(this.content!=null)
            msg+="content :"+this.content.substring(0,this.content.length()<=10?this.content.length():10);
        return msg+"]";
    }
}
